<%-- 
    Document   : assigne-table
    Created on : 19 juin 2012, 23:11:04
    Author     : TaKeO
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../css/style.css" />
        <title>Assigner une table</title>
    </head>
    <body>        
    <div id="container">
        <div id="header">
            <%@include file="template/header.jsp" %>
        </div>
        <div id="center-layout">
            <div id="content">
                <h1>Assigner une table</h1>
                <form method="POST" name="form" class="form-horizontal">
                    <fieldset>
                        <div class="control-group">
                            <label class="control-label" for="employe">Choisir l'employé :</label>
                            <div class="controls">
                                <select id="employe" name="employe">
                                    <c:forEach items="${employes}" var="employe">
                                        <option value="${employe.id_employe}">${employe.nom} ${employe.prenom}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>
                        
                        <div class="control-group">
                            <div class="controls">
                                <input type="submit" value="Choisir l'employé" class="btn-primary"/>
                            </div>
                        </div>
                    </fieldset>
                </form>
                
                <form method="POST" name="form" class="form-horizontal">
                    <fieldset>
                        <div class="control-group">
                            <label class="control-label" for="resto">Choisir le restaurant de l'employé :</label>
                            <div class="controls">
                                <c:forEach items="${tables}" var="table">
                                    <input type="checkbox" disabled="false" checked="true" name="table" value="${table.id_table}"> ${table.nom}<br>
                                </c:forEach>
                                <c:forEach items="${tablesRestos}" var="table">
                                    <c:choose>
                                        <c:when test="${empty table.serveur}">
                                            <input type="checkbox" checked="false" name="table" value="${table.id_table}"> ${table.nom}<br>
                                        </c:when>
                                        <c:otherwise>
                                            <input type="checkbox" disabled="true" checked="false" name="table" value="${table.id_table}"> ${table.nom}<br>
                                        </c:otherwise>
                                    </c:choose>
                                </c:forEach> 
                            </div>
                        </div>
                        
                        <div class="control-group">
                            <div class="controls">
                                <input type="submit" value="Assigner" class="btn-primary"/>
                            </div>
                        </div>
                    </fieldset>
                </form>                                    
            </div>
        </div>
            <div id="right-layout">
                
            </div>
            <div id="left-layout">
                <%@include file="template/left-layout.jsp" %>
            </div>
    </div>
    </body>
</html>